<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>

<title>Ruby on Rails 4.1 Release Notes — Ruby on Rails Guides</title>
<link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />

<link rel="stylesheet" type="text/css" href="stylesheets/syntaxhighlighter/shCore.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/syntaxhighlighter/shThemeRailsGuides.css" />

<link rel="stylesheet" type="text/css" href="stylesheets/fixes.css" />

<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body class="guide">
  <div id="topNav">
    <div class="wrapper">
      <strong class="more-info-label">更多内容 <a href="http://rubyonrails.org/">rubyonrails.org:</a> </strong>
      <span class="red-button more-info-button">
        更多内容
      </span>
      <ul class="more-info-links s-hidden">
        <li class="more-info"><a href="http://weblog.rubyonrails.org/">博客</a></li>
        <li class="more-info"><a href="http://guides.rubyonrails.org/">指南</a></li>
        <li class="more-info"><a href="http://api.rubyonrails.org/">API</a></li>
        <li class="more-info"><a href="http://stackoverflow.com/questions/tagged/ruby-on-rails">提问</a></li>
        <li class="more-info"><a href="https://github.com/rails/rails">到 GitHub 贡献</a></li>
        <li class="more-info"><a href="https://ruby-china.org/">Ruby China 社区</a></li>
      </ul>
    </div>
  </div>
  <div id="header">
    <div class="wrapper clearfix">
      <h1><a href="index.html" title="返回首页">Rails 指南</a></h1>
      <ul class="nav">
        <li><a class="nav-item" href="index.html">首页</a></li>
        <li class="guides-index guides-index-large">
          <a href="index.html" id="guidesMenu" class="guides-index-item nav-item">指南索引</a>
          <div id="guides" class="clearfix" style="display: none;">
            <hr />
              <dl class="L">
                <dt>新手入门</dt>
                <dd><a href="getting_started.html">Rails 入门</a></dd>
                <dt>模型</dt>
                <dd><a href="active_record_basics.html">Active Record 基础</a></dd>
                <dd><a href="active_record_migrations.html">Active Record 迁移</a></dd>
                <dd><a href="active_record_validations.html">Active Record 数据验证</a></dd>
                <dd><a href="active_record_callbacks.html">Active Record 回调</a></dd>
                <dd><a href="association_basics.html">Active Record 关联</a></dd>
                <dd><a href="active_record_querying.html">Active Record 查询接口</a></dd>
                <dt>视图</dt>
                <dd><a href="layouts_and_rendering.html">Rails 布局和视图渲染</a></dd>
                <dd><a href="form_helpers.html">Action View 表单辅助方法</a></dd>
                <dt>控制器</dt>
                <dd><a href="action_controller_overview.html">Action Controller 概览</a></dd>
                <dd><a href="routing.html">Rails 路由全解</a></dd>
              </dl>
              <dl class="R">
                <dt>深入探索</dt>
                <dd><a href="active_support_core_extensions.html">Active Support 核心扩展</a></dd>
                <dd><a href="i18n.html">Rails 国际化 API</a></dd>
                <dd><a href="action_mailer_basics.html">Action Mailer 基础</a></dd>
                <dd><a href="active_job_basics.html">Active Job 基础</a></dd>
                <dd><a href="testing.html">Rails 应用测试指南</a></dd>
                <dd><a href="security.html">Ruby on Rails 安全指南</a></dd>
                <dd><a href="debugging_rails_applications.html">调试 Rails 应用</a></dd>
                <dd><a href="configuring.html">配置 Rails 应用</a></dd>
                <dd><a href="command_line.html">Rails 命令行</a></dd>
                <dd><a href="asset_pipeline.html">Asset Pipeline</a></dd>
                <dd><a href="working_with_javascript_in_rails.html">在 Rails 中使用 JavaScript</a></dd>
                <dd><a href="autoloading_and_reloading_constants.html">自动加载和重新加载常量</a></dd>
                <dd><a href="caching_with_rails.html">Rails 缓存概览</a></dd>
                <dd><a href="api_app.html">使用 Rails 开发只提供 API 的应用</a></dd>
                <dd><a href="action_cable_overview.html">Action Cable 概览</a></dd>
                <dt>扩展 Rails</dt>
                <dd><a href="rails_on_rack.html">Rails on Rack</a></dd>
                <dd><a href="generators.html">创建及定制 Rails 生成器和模板</a></dd>
                <dt>为 Ruby on Rails 做贡献</dt>
                <dd><a href="contributing_to_ruby_on_rails.html">为 Ruby on Rails 做贡献</a></dd>
                <dd><a href="api_documentation_guidelines.html">API 文档指导方针</a></dd>
                <dd><a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails 指南指导方针</a></dd>
                <dt>维护方针</dt>
                <dd><a href="maintenance_policy.html">Ruby on Rails 的维护方针</a></dd>
                <dt>发布记</dt>
                <dd><a href="upgrading_ruby_on_rails.html">Ruby on Rails 升级指南</a></dd>
                <dd><a href="5_0_release_notes.html">Ruby on Rails 5.0 发布记</a></dd>
                <dd><a href="4_2_release_notes.html">Ruby on Rails 4.2 发布记</a></dd>
                <dd><a href="4_1_release_notes.html">Ruby on Rails 4.1 发布记</a></dd>
                <dd><a href="4_0_release_notes.html">Ruby on Rails 4.0 发布记</a></dd>
                <dd><a href="3_2_release_notes.html">Ruby on Rails 3.2 发布记</a></dd>
                <dd><a href="3_1_release_notes.html">Ruby on Rails 3.1 发布记</a></dd>
                <dd><a href="3_0_release_notes.html">Ruby on Rails 3.0 发布记</a></dd>
                <dd><a href="2_3_release_notes.html">Ruby on Rails 2.3 发布记</a></dd>
                <dd><a href="2_2_release_notes.html">Ruby on Rails 2.2 发布记</a></dd>
              </dl>
          </div>
        </li>
        <li><a class="nav-item" href="contributing_to_ruby_on_rails.html">贡献</a></li>
        <li><a class="nav-item" href="credits.html">感谢</a></li>
        <li class="guides-index guides-index-small">
          <select class="guides-index-item nav-item">
            <option value="index.html">指南索引</option>
              <optgroup label="新手入门">
                  <option value="getting_started.html">Rails 入门</option>
              </optgroup>
              <optgroup label="模型">
                  <option value="active_record_basics.html">Active Record 基础</option>
                  <option value="active_record_migrations.html">Active Record 迁移</option>
                  <option value="active_record_validations.html">Active Record 数据验证</option>
                  <option value="active_record_callbacks.html">Active Record 回调</option>
                  <option value="association_basics.html">Active Record 关联</option>
                  <option value="active_record_querying.html">Active Record 查询接口</option>
              </optgroup>
              <optgroup label="视图">
                  <option value="layouts_and_rendering.html">Rails 布局和视图渲染</option>
                  <option value="form_helpers.html">Action View 表单辅助方法</option>
              </optgroup>
              <optgroup label="控制器">
                  <option value="action_controller_overview.html">Action Controller 概览</option>
                  <option value="routing.html">Rails 路由全解</option>
              </optgroup>
              <optgroup label="深入探索">
                  <option value="active_support_core_extensions.html">Active Support 核心扩展</option>
                  <option value="i18n.html">Rails 国际化 API</option>
                  <option value="action_mailer_basics.html">Action Mailer 基础</option>
                  <option value="active_job_basics.html">Active Job 基础</option>
                  <option value="testing.html">Rails 应用测试指南</option>
                  <option value="security.html">Ruby on Rails 安全指南</option>
                  <option value="debugging_rails_applications.html">调试 Rails 应用</option>
                  <option value="configuring.html">配置 Rails 应用</option>
                  <option value="command_line.html">Rails 命令行</option>
                  <option value="asset_pipeline.html">Asset Pipeline</option>
                  <option value="working_with_javascript_in_rails.html">在 Rails 中使用 JavaScript</option>
                  <option value="autoloading_and_reloading_constants.html">自动加载和重新加载常量</option>
                  <option value="caching_with_rails.html">Rails 缓存概览</option>
                  <option value="api_app.html">使用 Rails 开发只提供 API 的应用</option>
                  <option value="action_cable_overview.html">Action Cable 概览</option>
              </optgroup>
              <optgroup label="扩展 Rails">
                  <option value="rails_on_rack.html">Rails on Rack</option>
                  <option value="generators.html">创建及定制 Rails 生成器和模板</option>
              </optgroup>
              <optgroup label="为 Ruby on Rails 做贡献">
                  <option value="contributing_to_ruby_on_rails.html">为 Ruby on Rails 做贡献</option>
                  <option value="api_documentation_guidelines.html">API 文档指导方针</option>
                  <option value="ruby_on_rails_guides_guidelines.html">Ruby on Rails 指南指导方针</option>
              </optgroup>
              <optgroup label="维护方针">
                  <option value="maintenance_policy.html">Ruby on Rails 的维护方针</option>
              </optgroup>
              <optgroup label="发布记">
                  <option value="upgrading_ruby_on_rails.html">Ruby on Rails 升级指南</option>
                  <option value="5_0_release_notes.html">Ruby on Rails 5.0 发布记</option>
                  <option value="4_2_release_notes.html">Ruby on Rails 4.2 发布记</option>
                  <option value="4_1_release_notes.html">Ruby on Rails 4.1 发布记</option>
                  <option value="4_0_release_notes.html">Ruby on Rails 4.0 发布记</option>
                  <option value="3_2_release_notes.html">Ruby on Rails 3.2 发布记</option>
                  <option value="3_1_release_notes.html">Ruby on Rails 3.1 发布记</option>
                  <option value="3_0_release_notes.html">Ruby on Rails 3.0 发布记</option>
                  <option value="2_3_release_notes.html">Ruby on Rails 2.3 发布记</option>
                  <option value="2_2_release_notes.html">Ruby on Rails 2.2 发布记</option>
              </optgroup>
          </select>
        </li>
      </ul>
    </div>
  </div>
  <hr class="hide" />

  <div id="feature">
    <div class="wrapper">
      <h2>Ruby on Rails 4.1 Release Notes</h2><p>Highlights in Rails 4.1:</p>
<ul>
<li>Spring application preloader</li>
<li><code>config/secrets.yml</code></li>
<li>Action Pack variants</li>
<li>Action Mailer previews</li>
</ul>
<p>These release notes cover only the major changes. To learn about various bug
fixes and changes, please refer to the change logs or check out the <a href="https://github.com/rails/rails/commits/4-1-stable">list of
commits</a> in the main Rails
repository on GitHub.</p>

              <div id="subCol">
          <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />目录</h3>
          <ol class="chapters">
<li><a href="#upgrading-to-rails-4-1">Upgrading to Rails 4.1</a></li>
<li>
<a href="#major-features">Major Features</a>

<ul>
<li><a href="#spring-application-preloader">Spring Application Preloader</a></li>
<li><a href="#config-secrets-yml"><code>config/secrets.yml</code></a></li>
<li><a href="#action-pack-variants">Action Pack Variants</a></li>
<li><a href="#action-mailer-previews">Action Mailer Previews</a></li>
<li><a href="#active-record-enums">Active Record enums</a></li>
<li><a href="#message-verifiers">Message Verifiers</a></li>
<li><a href="#module-concerning">Module#concerning</a></li>
<li><a href="#csrf-protection-from-remote-script-tags">CSRF protection from remote <code>&lt;script&gt;</code> tags</a></li>
</ul>
</li>
<li>
<a href="#railties">Railties</a>

<ul>
<li><a href="#railties-removals">Removals</a></li>
<li><a href="#railties-notable-changes">Notable changes</a></li>
</ul>
</li>
<li>
<a href="#action-pack">Action Pack</a>

<ul>
<li><a href="#action-pack-removals">Removals</a></li>
<li><a href="#action-pack-notable-changes">Notable changes</a></li>
</ul>
</li>
<li>
<a href="#action-mailer">Action Mailer</a>

<ul>
<li><a href="#action-mailer-notable-changes">Notable changes</a></li>
</ul>
</li>
<li>
<a href="#active-record">Active Record</a>

<ul>
<li><a href="#active-record-removals">Removals</a></li>
<li><a href="#active-record-deprecations">Deprecations</a></li>
<li><a href="#active-record-notable-changes">Notable changes</a></li>
</ul>
</li>
<li>
<a href="#active-model">Active Model</a>

<ul>
<li><a href="#active-model-deprecations">Deprecations</a></li>
<li><a href="#active-model-notable-changes">Notable changes</a></li>
</ul>
</li>
<li>
<a href="#active-support">Active Support</a>

<ul>
<li><a href="#active-support-removals">Removals</a></li>
<li><a href="#deprecations">Deprecations</a></li>
<li><a href="#active-support-notable-changes">Notable changes</a></li>
</ul>
</li>
<li><a href="#credits">Credits</a></li>
</ol>

        </div>

    </div>
  </div>

  <div id="container">
    <div class="wrapper">
      <div id="mainCol">
        <h3 id="upgrading-to-rails-4-1">1 Upgrading to Rails 4.1</h3><p>If you're upgrading an existing application, it's a great idea to have good test
coverage before going in. You should also first upgrade to Rails 4.0 in case you
haven't and make sure your application still runs as expected before attempting
an update to Rails 4.1. A list of things to watch out for when upgrading is
available in the
<a href="upgrading_ruby_on_rails.html#upgrading-from-rails-4-0-to-rails-4-1">Upgrading Ruby on Rails</a>
guide.</p><h3 id="major-features">2 Major Features</h3><h4 id="spring-application-preloader">2.1 Spring Application Preloader</h4><p>Spring is a Rails application preloader. It speeds up development by keeping
your application running in the background so you don't need to boot it every
time you run a test, rake task or migration.</p><p>New Rails 4.1 applications will ship with "springified" binstubs. This means
that <code>bin/rails</code> and <code>bin/rake</code> will automatically take advantage of preloaded
spring environments.</p><p><strong>Running rake tasks:</strong></p><div class="code_container">
<pre class="brush: plain; gutter: false; toolbar: false">
bin/rake test:models

</pre>
</div>
<p><strong>Running a Rails command:</strong></p><div class="code_container">
<pre class="brush: plain; gutter: false; toolbar: false">
bin/rails console

</pre>
</div>
<p><strong>Spring introspection:</strong></p><div class="code_container">
<pre class="brush: plain; gutter: false; toolbar: false">
$ bin/spring status
Spring is running:

 1182 spring server | my_app | started 29 mins ago
 3656 spring app    | my_app | started 23 secs ago | test mode
 3746 spring app    | my_app | started 10 secs ago | development mode

</pre>
</div>
<p>Have a look at the
<a href="https://github.com/rails/spring/blob/master/README.md">Spring README</a> to
see all available features.</p><p>See the <a href="upgrading_ruby_on_rails.html#spring">Upgrading Ruby on Rails</a>
guide on how to migrate existing applications to use this feature.</p><h4 id="config-secrets-yml">2.2 <code>config/secrets.yml</code>
</h4><p>Rails 4.1 generates a new <code>secrets.yml</code> file in the <code>config</code> folder. By default,
this file contains the application's <code>secret_key_base</code>, but it could also be
used to store other secrets such as access keys for external APIs.</p><p>The secrets added to this file are accessible via <code>Rails.application.secrets</code>.
For example, with the following <code>config/secrets.yml</code>:</p><div class="code_container">
<pre class="brush: plain; gutter: false; toolbar: false">
development:
  secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
  some_api_key: SOMEKEY

</pre>
</div>
<p><code>Rails.application.secrets.some_api_key</code> returns <code>SOMEKEY</code> in the development
environment.</p><p>See the <a href="upgrading_ruby_on_rails.html#config-secrets-yml">Upgrading Ruby on Rails</a>
guide on how to migrate existing applications to use this feature.</p><h4 id="action-pack-variants">2.3 Action Pack Variants</h4><p>We often want to render different HTML/JSON/XML templates for phones,
tablets, and desktop browsers. Variants make it easy.</p><p>The request variant is a specialization of the request format, like <code>:tablet</code>,
<code>:phone</code>, or <code>:desktop</code>.</p><p>You can set the variant in a <code>before_action</code>:</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
request.variant = :tablet if request.user_agent =~ /iPad/

</pre>
</div>
<p>Respond to variants in the action just like you respond to formats:</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
respond_to do |format|
  format.html do |html|
    html.tablet # renders app/views/projects/show.html+tablet.erb
    html.phone { extra_setup; render ... }
  end
end

</pre>
</div>
<p>Provide separate templates for each format and variant:</p><div class="code_container">
<pre class="brush: plain; gutter: false; toolbar: false">
app/views/projects/show.html.erb
app/views/projects/show.html+tablet.erb
app/views/projects/show.html+phone.erb

</pre>
</div>
<p>You can also simplify the variants definition using the inline syntax:</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
respond_to do |format|
  format.js         { render "trash" }
  format.html.phone { redirect_to progress_path }
  format.html.none  { render "trash" }
end

</pre>
</div>
<h4 id="action-mailer-previews">2.4 Action Mailer Previews</h4><p>Action Mailer previews provide a way to see how emails look by visiting
a special URL that renders them.</p><p>You implement a preview class whose methods return the mail object you'd like
to check:</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
class NotifierPreview &lt; ActionMailer::Preview
  def welcome
    Notifier.welcome(User.first)
  end
end

</pre>
</div>
<p>The preview is available in <a href="http://localhost:3000/rails/mailers/notifier/welcome">http://localhost:3000/rails/mailers/notifier/welcome</a>,
and a list of them in <a href="http://localhost:3000/rails/mailers">http://localhost:3000/rails/mailers</a>.</p><p>By default, these preview classes live in <code>test/mailers/previews</code>.
This can be configured using the <code>preview_path</code> option.</p><p>See its
<a href="http://api.rubyonrails.org/v4.1.0/classes/ActionMailer/Base.html#class-ActionMailer::Base-label-Previewing+emails">documentation</a>
for a detailed write up.</p><h4 id="active-record-enums">2.5 Active Record enums</h4><p>Declare an enum attribute where the values map to integers in the database, but
can be queried by name.</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
class Conversation &lt; ActiveRecord::Base
  enum status: [ :active, :archived ]
end

conversation.archived!
conversation.active? # =&gt; false
conversation.status  # =&gt; "archived"

Conversation.archived # =&gt; Relation for all archived Conversations

Conversation.statuses # =&gt; { "active" =&gt; 0, "archived" =&gt; 1 }

</pre>
</div>
<p>See its
<a href="http://api.rubyonrails.org/v4.1.0/classes/ActiveRecord/Enum.html">documentation</a>
for a detailed write up.</p><h4 id="message-verifiers">2.6 Message Verifiers</h4><p>Message verifiers can be used to generate and verify signed messages. This can
be useful to safely transport sensitive data like remember-me tokens and
friends.</p><p>The method <code>Rails.application.message_verifier</code> returns a new message verifier
that signs messages with a key derived from secret_key_base and the given
message verifier name:</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
signed_token = Rails.application.message_verifier(:remember_me).generate(token)
Rails.application.message_verifier(:remember_me).verify(signed_token) # =&gt; token

Rails.application.message_verifier(:remember_me).verify(tampered_token)
# raises ActiveSupport::MessageVerifier::InvalidSignature

</pre>
</div>
<h4 id="module-concerning">2.7 Module#concerning</h4><p>A natural, low-ceremony way to separate responsibilities within a class:</p><div class="code_container">
<pre class="brush: ruby; gutter: false; toolbar: false">
class Todo &lt; ActiveRecord::Base
  concerning :EventTracking do
    included do
      has_many :events
    end

    def latest_event
      ...
    end

    private
      def some_internal_method
        ...
      end
  end
end

</pre>
</div>
<p>This example is equivalent to defining a <code>EventTracking</code> module inline,
extending it with <code>ActiveSupport::Concern</code>, then mixing it in to the
<code>Todo</code> class.</p><p>See its
<a href="http://api.rubyonrails.org/v4.1.0/classes/Module/Concerning.html">documentation</a>
for a detailed write up and the intended use cases.</p><h4 id="csrf-protection-from-remote-script-tags">2.8 CSRF protection from remote <code>&lt;script&gt;</code> tags</h4><p>Cross-site request forgery (CSRF) protection now covers GET requests with
JavaScript responses, too. That prevents a third-party site from referencing
your JavaScript URL and attempting to run it to extract sensitive data.</p><p>This means any of your tests that hit <code>.js</code> URLs will now fail CSRF protection
unless they use <code>xhr</code>. Upgrade your tests to be explicit about expecting
XmlHttpRequests. Instead of <code>post :create, format: :js</code>, switch to the explicit
<code>xhr :post, :create, format: :js</code>.</p><h3 id="railties">3 Railties</h3><p>Please refer to the
<a href="https://github.com/rails/rails/blob/4-1-stable/railties/CHANGELOG.md">Changelog</a>
for detailed changes.</p><h4 id="railties-removals">3.1 Removals</h4>
<ul>
<li><p>Removed <code>update:application_controller</code> rake task.</p></li>
<li><p>Removed deprecated <code>Rails.application.railties.engines</code>.</p></li>
<li><p>Removed deprecated <code>threadsafe!</code> from Rails Config.</p></li>
<li><p>Removed deprecated <code>ActiveRecord::Generators::ActiveModel#update_attributes</code> in
favor of <code>ActiveRecord::Generators::ActiveModel#update</code>.</p></li>
<li><p>Removed deprecated <code>config.whiny_nils</code> option.</p></li>
<li><p>Removed deprecated rake tasks for running tests: <code>rake test:uncommitted</code> and
<code>rake test:recent</code>.</p></li>
</ul>
<h4 id="railties-notable-changes">3.2 Notable changes</h4>
<ul>
<li><p>The <a href="https://github.com/rails/spring">Spring application
preloader</a> is now installed
by default for new applications. It uses the development group of
the Gemfile, so will not be installed in
production. (<a href="https://github.com/rails/rails/pull/12958">Pull Request</a>)</p></li>
<li><p><code>BACKTRACE</code> environment variable to show unfiltered backtraces for test
failures. (<a href="https://github.com/rails/rails/commit/84eac5dab8b0fe9ee20b51250e52ad7bfea36553">Commit</a>)</p></li>
<li><p>Exposed <code>MiddlewareStack#unshift</code> to environment
configuration. (<a href="https://github.com/rails/rails/pull/12479">Pull Request</a>)</p></li>
<li><p>Added <code>Application#message_verifier</code> method to return a message
verifier. (<a href="https://github.com/rails/rails/pull/12995">Pull Request</a>)</p></li>
<li><p>The <code>test_help.rb</code> file which is required by the default generated test
helper will automatically keep your test database up-to-date with
<code>db/schema.rb</code> (or <code>db/structure.sql</code>). It raises an error if
reloading the schema does not resolve all pending migrations. Opt out
with <code>config.active_record.maintain_test_schema = false</code>. (<a href="https://github.com/rails/rails/pull/13528">Pull
Request</a>)</p></li>
<li><p>Introduce <code>Rails.gem_version</code> as a convenience method to return
<code>Gem::Version.new(Rails.version)</code>, suggesting a more reliable way to perform
version comparison. (<a href="https://github.com/rails/rails/pull/14103">Pull Request</a>)</p></li>
</ul>
<h3 id="action-pack">4 Action Pack</h3><p>Please refer to the
<a href="https://github.com/rails/rails/blob/4-1-stable/actionpack/CHANGELOG.md">Changelog</a>
for detailed changes.</p><h4 id="action-pack-removals">4.1 Removals</h4>
<ul>
<li><p>Removed deprecated Rails application fallback for integration testing, set
<code>ActionDispatch.test_app</code> instead.</p></li>
<li><p>Removed deprecated <code>page_cache_extension</code> config.</p></li>
<li><p>Removed deprecated <code>ActionController::RecordIdentifier</code>, use
<code>ActionView::RecordIdentifier</code> instead.</p></li>
<li><p>Removed deprecated constants from Action Controller:</p></li>
</ul>

<table>
<thead>
<tr>
<th style="text-align: left">Removed</th>
<th style="text-align: left">Successor</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">ActionController::AbstractRequest</td>
<td style="text-align: left">ActionDispatch::Request</td>
</tr>
<tr>
<td style="text-align: left">ActionController::Request</td>
<td style="text-align: left">ActionDispatch::Request</td>
</tr>
<tr>
<td style="text-align: left">ActionController::AbstractResponse</td>
<td style="text-align: left">ActionDispatch::Response</td>
</tr>
<tr>
<td style="text-align: left">ActionController::Response</td>
<td style="text-align: left">ActionDispatch::Response</td>
</tr>
<tr>
<td style="text-align: left">ActionController::Routing</td>
<td style="text-align: left">ActionDispatch::Routing</td>
</tr>
<tr>
<td style="text-align: left">ActionController::Integration</td>
<td style="text-align: left">ActionDispatch::Integration</td>
</tr>
<tr>
<td style="text-align: left">ActionController::IntegrationTest</td>
<td style="text-align: left">ActionDispatch::IntegrationTest</td>
</tr>
</tbody>
</table>
<h4 id="action-pack-notable-changes">4.2 Notable changes</h4>
<ul>
<li><p><code>protect_from_forgery</code> also prevents cross-origin <code>&lt;script&gt;</code> tags.
Update your tests to use <code>xhr :get, :foo, format: :js</code> instead of
<code>get :foo, format: :js</code>.
(<a href="https://github.com/rails/rails/pull/13345">Pull Request</a>)</p></li>
<li><p><code>#url_for</code> takes a hash with options inside an
array. (<a href="https://github.com/rails/rails/pull/9599">Pull Request</a>)</p></li>
<li><p>Added <code>session#fetch</code> method fetch behaves similarly to
<a href="http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch">Hash#fetch</a>,
with the exception that the returned value is always saved into the
session. (<a href="https://github.com/rails/rails/pull/12692">Pull Request</a>)</p></li>
<li><p>Separated Action View completely from Action
Pack. (<a href="https://github.com/rails/rails/pull/11032">Pull Request</a>)</p></li>
<li><p>Log which keys were affected by deep
munge. (<a href="https://github.com/rails/rails/pull/13813">Pull Request</a>)</p></li>
<li><p>New config option <code>config.action_dispatch.perform_deep_munge</code> to opt out of
params "deep munging" that was used to address security vulnerability
CVE-2013-0155. (<a href="https://github.com/rails/rails/pull/13188">Pull Request</a>)</p></li>
<li><p>New config option <code>config.action_dispatch.cookies_serializer</code> for specifying a
serializer for the signed and encrypted cookie jars. (Pull Requests
<a href="https://github.com/rails/rails/pull/13692">1</a>,
<a href="https://github.com/rails/rails/pull/13945">2</a> /
<a href="upgrading_ruby_on_rails.html#cookies-serializer">More Details</a>)</p></li>
<li><p>Added <code>render :plain</code>, <code>render :html</code> and <code>render
:body</code>. (<a href="https://github.com/rails/rails/pull/14062">Pull Request</a> /
<a href="upgrading_ruby_on_rails.html#rendering-content-from-string">More Details</a>)</p></li>
</ul>
<h3 id="action-mailer">5 Action Mailer</h3><p>Please refer to the
<a href="https://github.com/rails/rails/blob/4-1-stable/actionmailer/CHANGELOG.md">Changelog</a>
for detailed changes.</p><h4 id="action-mailer-notable-changes">5.1 Notable changes</h4>
<ul>
<li><p>Added mailer previews feature based on 37 Signals mail_view
gem. (<a href="https://github.com/rails/rails/commit/d6dec7fcb6b8fddf8c170182d4fe64ecfc7b2261">Commit</a>)</p></li>
<li><p>Instrument the generation of Action Mailer messages. The time it takes to
generate a message is written to the log. (<a href="https://github.com/rails/rails/pull/12556">Pull Request</a>)</p></li>
</ul>
<h3 id="active-record">6 Active Record</h3><p>Please refer to the
<a href="https://github.com/rails/rails/blob/4-1-stable/activerecord/CHANGELOG.md">Changelog</a>
for detailed changes.</p><h4 id="active-record-removals">6.1 Removals</h4>
<ul>
<li><p>Removed deprecated nil-passing to the following <code>SchemaCache</code> methods:
<code>primary_keys</code>, <code>tables</code>, <code>columns</code> and <code>columns_hash</code>.</p></li>
<li><p>Removed deprecated block filter from <code>ActiveRecord::Migrator#migrate</code>.</p></li>
<li><p>Removed deprecated String constructor from <code>ActiveRecord::Migrator</code>.</p></li>
<li><p>Removed deprecated <code>scope</code> use without passing a callable object.</p></li>
<li><p>Removed deprecated <code>transaction_joinable=</code> in favor of <code>begin_transaction</code>
with a <code>:joinable</code> option.</p></li>
<li><p>Removed deprecated <code>decrement_open_transactions</code>.</p></li>
<li><p>Removed deprecated <code>increment_open_transactions</code>.</p></li>
<li><p>Removed deprecated <code>PostgreSQLAdapter#outside_transaction?</code>
method. You can use <code>#transaction_open?</code> instead.</p></li>
<li><p>Removed deprecated <code>ActiveRecord::Fixtures.find_table_name</code> in favor of
<code>ActiveRecord::Fixtures.default_fixture_model_name</code>.</p></li>
<li><p>Removed deprecated <code>columns_for_remove</code> from <code>SchemaStatements</code>.</p></li>
<li><p>Removed deprecated <code>SchemaStatements#distinct</code>.</p></li>
<li><p>Moved deprecated <code>ActiveRecord::TestCase</code> into the Rails test
suite. The class is no longer public and is only used for internal
Rails tests.</p></li>
<li><p>Removed support for deprecated option <code>:restrict</code> for <code>:dependent</code>
in associations.</p></li>
<li><p>Removed support for deprecated <code>:delete_sql</code>, <code>:insert_sql</code>, <code>:finder_sql</code>
and <code>:counter_sql</code> options in associations.</p></li>
<li><p>Removed deprecated method <code>type_cast_code</code> from Column.</p></li>
<li><p>Removed deprecated <code>ActiveRecord::Base#connection</code> method.
Make sure to access it via the class.</p></li>
<li><p>Removed deprecation warning for <code>auto_explain_threshold_in_seconds</code>.</p></li>
<li><p>Removed deprecated <code>:distinct</code> option from <code>Relation#count</code>.</p></li>
<li><p>Removed deprecated methods <code>partial_updates</code>, <code>partial_updates?</code> and
<code>partial_updates=</code>.</p></li>
<li><p>Removed deprecated method <code>scoped</code>.</p></li>
<li><p>Removed deprecated method <code>default_scopes?</code>.</p></li>
<li><p>Remove implicit join references that were deprecated in 4.0.</p></li>
<li><p>Removed <code>activerecord-deprecated_finders</code> as a dependency.
Please see <a href="https://github.com/rails/activerecord-deprecated_finders#active-record-deprecated-finders">the gem README</a>
for more info.</p></li>
<li><p>Removed usage of <code>implicit_readonly</code>. Please use <code>readonly</code> method
explicitly to mark records as
<code>readonly</code>. (<a href="https://github.com/rails/rails/pull/10769">Pull Request</a>)</p></li>
</ul>
<h4 id="active-record-deprecations">6.2 Deprecations</h4>
<ul>
<li><p>Deprecated <code>quoted_locking_column</code> method, which isn't used anywhere.</p></li>
<li><p>Deprecated <code>ConnectionAdapters::SchemaStatements#distinct</code>,
as it is no longer used by internals. (<a href="https://github.com/rails/rails/pull/10556">Pull Request</a>)</p></li>
<li><p>Deprecated <code>rake db:test:*</code> tasks as the test database is now
automatically maintained. See railties release notes. (<a href="https://github.com/rails/rails/pull/13528">Pull
Request</a>)</p></li>
<li><p>Deprecate unused <code>ActiveRecord::Base.symbolized_base_class</code>
and <code>ActiveRecord::Base.symbolized_sti_name</code> without
replacement. <a href="https://github.com/rails/rails/commit/97e7ca48c139ea5cce2fa9b4be631946252a1ebd">Commit</a></p></li>
</ul>
<h4 id="active-record-notable-changes">6.3 Notable changes</h4>
<ul>
<li>Default scopes are no longer overridden by chained conditions.</li>
</ul>
<p>  Before this change when you defined a <code>default_scope</code> in a model
  it was overridden by chained conditions in the same field. Now it
  is merged like any other scope. <a href="upgrading_ruby_on_rails.html#changes-on-default-scopes">More Details</a>.</p>
<ul>
<li><p>Added <code>ActiveRecord::Base.to_param</code> for convenient "pretty" URLs derived from
a model's attribute or
method. (<a href="https://github.com/rails/rails/pull/12891">Pull Request</a>)</p></li>
<li><p>Added <code>ActiveRecord::Base.no_touching</code>, which allows ignoring touch on
models. (<a href="https://github.com/rails/rails/pull/12772">Pull Request</a>)</p></li>
<li><p>Unify boolean type casting for <code>MysqlAdapter</code> and <code>Mysql2Adapter</code>.
<code>type_cast</code> will return <code>1</code> for <code>true</code> and <code>0</code> for <code>false</code>. (<a href="https://github.com/rails/rails/pull/12425">Pull Request</a>)</p></li>
<li><p><code>.unscope</code> now removes conditions specified in
<code>default_scope</code>. (<a href="https://github.com/rails/rails/commit/94924dc32baf78f13e289172534c2e71c9c8cade">Commit</a>)</p></li>
<li><p>Added <code>ActiveRecord::QueryMethods#rewhere</code> which will overwrite an existing,
named where condition. (<a href="https://github.com/rails/rails/commit/f950b2699f97749ef706c6939a84dfc85f0b05f2">Commit</a>)</p></li>
<li><p>Extended <code>ActiveRecord::Base#cache_key</code> to take an optional list of timestamp
attributes of which the highest will be used. (<a href="https://github.com/rails/rails/commit/e94e97ca796c0759d8fcb8f946a3bbc60252d329">Commit</a>)</p></li>
<li><p>Added <code>ActiveRecord::Base#enum</code> for declaring enum attributes where the values
map to integers in the database, but can be queried by
name. (<a href="https://github.com/rails/rails/commit/db41eb8a6ea88b854bf5cd11070ea4245e1639c5">Commit</a>)</p></li>
<li><p>Type cast json values on write, so that the value is consistent with reading
from the database. (<a href="https://github.com/rails/rails/pull/12643">Pull Request</a>)</p></li>
<li><p>Type cast hstore values on write, so that the value is consistent
with reading from the database. (<a href="https://github.com/rails/rails/commit/5ac2341fab689344991b2a4817bd2bc8b3edac9d">Commit</a>)</p></li>
<li><p>Make <code>next_migration_number</code> accessible for third party
generators. (<a href="https://github.com/rails/rails/pull/12407">Pull Request</a>)</p></li>
<li><p>Calling <code>update_attributes</code> will now throw an <code>ArgumentError</code> whenever it
gets a <code>nil</code> argument. More specifically, it will throw an error if the
argument that it gets passed does not respond to to
<code>stringify_keys</code>. (<a href="https://github.com/rails/rails/pull/9860">Pull Request</a>)</p></li>
<li><p><code>CollectionAssociation#first</code>/<code>#last</code> (e.g. <code>has_many</code>) use a <code>LIMIT</code>ed
query to fetch results rather than loading the entire
collection. (<a href="https://github.com/rails/rails/pull/12137">Pull Request</a>)</p></li>
<li><p><code>inspect</code> on Active Record model classes does not initiate a new
connection. This means that calling <code>inspect</code>, when the database is missing,
will no longer raise an exception. (<a href="https://github.com/rails/rails/pull/11014">Pull Request</a>)</p></li>
<li><p>Removed column restrictions for <code>count</code>, let the database raise if the SQL is
invalid. (<a href="https://github.com/rails/rails/pull/10710">Pull Request</a>)</p></li>
<li><p>Rails now automatically detects inverse associations. If you do not set the
<code>:inverse_of</code> option on the association, then Active Record will guess the
inverse association based on heuristics. (<a href="https://github.com/rails/rails/pull/10886">Pull Request</a>)</p></li>
<li><p>Handle aliased attributes in ActiveRecord::Relation. When using symbol keys,
ActiveRecord will now translate aliased attribute names to the actual column
name used in the database. (<a href="https://github.com/rails/rails/pull/7839">Pull Request</a>)</p></li>
<li><p>The ERB in fixture files is no longer evaluated in the context of the main
object. Helper methods used by multiple fixtures should be defined on modules
included in <code>ActiveRecord::FixtureSet.context_class</code>. (<a href="https://github.com/rails/rails/pull/13022">Pull Request</a>)</p></li>
<li><p>Don't create or drop the test database if RAILS_ENV is specified
explicitly. (<a href="https://github.com/rails/rails/pull/13629">Pull Request</a>)</p></li>
<li><p><code>Relation</code> no longer has mutator methods like <code>#map!</code> and <code>#delete_if</code>. Convert
to an <code>Array</code> by calling <code>#to_a</code> before using these methods. (<a href="https://github.com/rails/rails/pull/13314">Pull Request</a>)</p></li>
<li><p><code>find_in_batches</code>, <code>find_each</code>, <code>Result#each</code> and <code>Enumerable#index_by</code> now
return an <code>Enumerator</code> that can calculate its
size. (<a href="https://github.com/rails/rails/pull/13938">Pull Request</a>)</p></li>
<li><p><code>scope</code>, <code>enum</code> and Associations now raise on "dangerous" name
conflicts. (<a href="https://github.com/rails/rails/pull/13450">Pull Request</a>,
<a href="https://github.com/rails/rails/pull/13896">Pull Request</a>)</p></li>
<li><p><code>second</code> through <code>fifth</code> methods act like the <code>first</code>
finder. (<a href="https://github.com/rails/rails/pull/13757">Pull Request</a>)</p></li>
<li><p>Make <code>touch</code> fire the <code>after_commit</code> and <code>after_rollback</code>
callbacks. (<a href="https://github.com/rails/rails/pull/12031">Pull Request</a>)</p></li>
<li><p>Enable partial indexes for <code>sqlite &gt;= 3.8.0</code>.
(<a href="https://github.com/rails/rails/pull/13350">Pull Request</a>)</p></li>
<li><p>Make <code>change_column_null</code>
revertible. (<a href="https://github.com/rails/rails/commit/724509a9d5322ff502aefa90dd282ba33a281a96">Commit</a>)</p></li>
<li><p>Added a flag to disable schema dump after migration. This is set to <code>false</code>
by default in the production environment for new applications.
(<a href="https://github.com/rails/rails/pull/13948">Pull Request</a>)</p></li>
</ul>
<h3 id="active-model">7 Active Model</h3><p>Please refer to the
<a href="https://github.com/rails/rails/blob/4-1-stable/activemodel/CHANGELOG.md">Changelog</a>
for detailed changes.</p><h4 id="active-model-deprecations">7.1 Deprecations</h4>
<ul>
<li>Deprecate <code>Validator#setup</code>. This should be done manually now in the
validator's constructor. (<a href="https://github.com/rails/rails/commit/7d84c3a2f7ede0e8d04540e9c0640de7378e9b3a">Commit</a>)</li>
</ul>
<h4 id="active-model-notable-changes">7.2 Notable changes</h4>
<ul>
<li><p>Added new API methods <code>reset_changes</code> and <code>changes_applied</code> to
<code>ActiveModel::Dirty</code> that control changes state.</p></li>
<li><p>Ability to specify multiple contexts when defining a
validation. (<a href="https://github.com/rails/rails/pull/13754">Pull Request</a>)</p></li>
<li><p><code>attribute_changed?</code> now accepts a hash to check if the attribute was changed
<code>:from</code> and/or <code>:to</code> a given
value. (<a href="https://github.com/rails/rails/pull/13131">Pull Request</a>)</p></li>
</ul>
<h3 id="active-support">8 Active Support</h3><p>Please refer to the
<a href="https://github.com/rails/rails/blob/4-1-stable/activesupport/CHANGELOG.md">Changelog</a>
for detailed changes.</p><h4 id="active-support-removals">8.1 Removals</h4>
<ul>
<li><p>Removed <code>MultiJSON</code> dependency. As a result, <code>ActiveSupport::JSON.decode</code>
no longer accepts an options hash for <code>MultiJSON</code>. (<a href="https://github.com/rails/rails/pull/10576">Pull Request</a> / <a href="upgrading_ruby_on_rails.html#changes-in-json-handling">More Details</a>)</p></li>
<li><p>Removed support for the <code>encode_json</code> hook used for encoding custom objects into
JSON. This feature has been extracted into the <a href="https://github.com/rails/activesupport-json_encoder">activesupport-json_encoder</a>
gem.
(<a href="https://github.com/rails/rails/pull/12183">Related Pull Request</a> /
<a href="upgrading_ruby_on_rails.html#changes-in-json-handling">More Details</a>)</p></li>
<li><p>Removed deprecated <code>ActiveSupport::JSON::Variable</code> with no replacement.</p></li>
<li><p>Removed deprecated <code>String#encoding_aware?</code> core extensions (<code>core_ext/string/encoding</code>).</p></li>
<li><p>Removed deprecated <code>Module#local_constant_names</code> in favor of <code>Module#local_constants</code>.</p></li>
<li><p>Removed deprecated <code>DateTime.local_offset</code> in favor of <code>DateTime.civil_from_format</code>.</p></li>
<li><p>Removed deprecated <code>Logger</code> core extensions (<code>core_ext/logger.rb</code>).</p></li>
<li><p>Removed deprecated <code>Time#time_with_datetime_fallback</code>, <code>Time#utc_time</code> and
<code>Time#local_time</code> in favor of <code>Time#utc</code> and <code>Time#local</code>.</p></li>
<li><p>Removed deprecated <code>Hash#diff</code> with no replacement.</p></li>
<li><p>Removed deprecated <code>Date#to_time_in_current_zone</code> in favor of <code>Date#in_time_zone</code>.</p></li>
<li><p>Removed deprecated <code>Proc#bind</code> with no replacement.</p></li>
<li><p>Removed deprecated <code>Array#uniq_by</code> and <code>Array#uniq_by!</code>, use native
<code>Array#uniq</code> and <code>Array#uniq!</code> instead.</p></li>
<li><p>Removed deprecated <code>ActiveSupport::BasicObject</code>, use
<code>ActiveSupport::ProxyObject</code> instead.</p></li>
<li><p>Removed deprecated <code>BufferedLogger</code>, use <code>ActiveSupport::Logger</code> instead.</p></li>
<li><p>Removed deprecated <code>assert_present</code> and <code>assert_blank</code> methods, use <code>assert
object.blank?</code> and <code>assert object.present?</code> instead.</p></li>
<li><p>Remove deprecated <code>#filter</code> method for filter objects, use the corresponding
method instead (e.g. <code>#before</code> for a before filter).</p></li>
<li><p>Removed 'cow' =&gt; 'kine' irregular inflection from default
inflections. (<a href="https://github.com/rails/rails/commit/c300dca9963bda78b8f358dbcb59cabcdc5e1dc9">Commit</a>)</p></li>
</ul>
<h4 id="deprecations">8.2 Deprecations</h4>
<ul>
<li><p>Deprecated <code>Numeric#{ago,until,since,from_now}</code>, the user is expected to
explicitly convert the value into an AS::Duration, i.e. <code>5.ago</code> =&gt; <code>5.seconds.ago</code>
(<a href="https://github.com/rails/rails/pull/12389">Pull Request</a>)</p></li>
<li><p>Deprecated the require path <code>active_support/core_ext/object/to_json</code>. Require
<code>active_support/core_ext/object/json</code> instead. (<a href="https://github.com/rails/rails/pull/12203">Pull Request</a>)</p></li>
<li><p>Deprecated <code>ActiveSupport::JSON::Encoding::CircularReferenceError</code>. This feature
has been extracted into the <a href="https://github.com/rails/activesupport-json_encoder">activesupport-json_encoder</a>
gem.
(<a href="https://github.com/rails/rails/pull/12785">Pull Request</a> /
<a href="upgrading_ruby_on_rails.html#changes-in-json-handling">More Details</a>)</p></li>
<li><p>Deprecated <code>ActiveSupport.encode_big_decimal_as_string</code> option. This feature has
been extracted into the <a href="https://github.com/rails/activesupport-json_encoder">activesupport-json_encoder</a>
gem.
(<a href="https://github.com/rails/rails/pull/13060">Pull Request</a> /
<a href="upgrading_ruby_on_rails.html#changes-in-json-handling">More Details</a>)</p></li>
<li><p>Deprecate custom <code>BigDecimal</code>
serialization. (<a href="https://github.com/rails/rails/pull/13911">Pull Request</a>)</p></li>
</ul>
<h4 id="active-support-notable-changes">8.3 Notable changes</h4>
<ul>
<li><p><code>ActiveSupport</code>'s JSON encoder has been rewritten to take advantage of the
JSON gem rather than doing custom encoding in pure-Ruby.
(<a href="https://github.com/rails/rails/pull/12183">Pull Request</a> /
<a href="upgrading_ruby_on_rails.html#changes-in-json-handling">More Details</a>)</p></li>
<li><p>Improved compatibility with the JSON gem.
(<a href="https://github.com/rails/rails/pull/12862">Pull Request</a> /
<a href="upgrading_ruby_on_rails.html#changes-in-json-handling">More Details</a>)</p></li>
<li><p>Added <code>ActiveSupport::Testing::TimeHelpers#travel</code> and <code>#travel_to</code>. These
methods change current time to the given time or duration by stubbing
<code>Time.now</code> and <code>Date.today</code>.</p></li>
<li><p>Added <code>ActiveSupport::Testing::TimeHelpers#travel_back</code>. This method returns
the current time to the original state, by removing the stubs added by <code>travel</code>
and <code>travel_to</code>. (<a href="https://github.com/rails/rails/pull/13884">Pull Request</a>)</p></li>
<li><p>Added <code>Numeric#in_milliseconds</code>, like <code>1.hour.in_milliseconds</code>, so we can feed
them to JavaScript functions like
<code>getTime()</code>. (<a href="https://github.com/rails/rails/commit/423249504a2b468d7a273cbe6accf4f21cb0e643">Commit</a>)</p></li>
<li><p>Added <code>Date#middle_of_day</code>, <code>DateTime#middle_of_day</code> and <code>Time#middle_of_day</code>
methods. Also added <code>midday</code>, <code>noon</code>, <code>at_midday</code>, <code>at_noon</code> and
<code>at_middle_of_day</code> as
aliases. (<a href="https://github.com/rails/rails/pull/10879">Pull Request</a>)</p></li>
<li><p>Added <code>Date#all_week/month/quarter/year</code> for generating date
ranges. (<a href="https://github.com/rails/rails/pull/9685">Pull Request</a>)</p></li>
<li><p>Added <code>Time.zone.yesterday</code> and
<code>Time.zone.tomorrow</code>. (<a href="https://github.com/rails/rails/pull/12822">Pull Request</a>)</p></li>
<li><p>Added <code>String#remove(pattern)</code> as a short-hand for the common pattern of
<code>String#gsub(pattern,'')</code>. (<a href="https://github.com/rails/rails/commit/5da23a3f921f0a4a3139495d2779ab0d3bd4cb5f">Commit</a>)</p></li>
<li><p>Added <code>Hash#compact</code> and <code>Hash#compact!</code> for removing items with nil value
from hash. (<a href="https://github.com/rails/rails/pull/13632">Pull Request</a>)</p></li>
<li><p><code>blank?</code> and <code>present?</code> commit to return
singletons. (<a href="https://github.com/rails/rails/commit/126dc47665c65cd129967cbd8a5926dddd0aa514">Commit</a>)</p></li>
<li><p>Default the new <code>I18n.enforce_available_locales</code> config to <code>true</code>, meaning
<code>I18n</code> will make sure that all locales passed to it must be declared in the
<code>available_locales</code>
list. (<a href="https://github.com/rails/rails/pull/13341">Pull Request</a>)</p></li>
<li><p>Introduce <code>Module#concerning</code>: a natural, low-ceremony way to separate
responsibilities within a
class. (<a href="https://github.com/rails/rails/commit/1eee0ca6de975b42524105a59e0521d18b38ab81">Commit</a>)</p></li>
<li><p>Added <code>Object#presence_in</code> to simplify value whitelisting.
(<a href="https://github.com/rails/rails/commit/4edca106daacc5a159289eae255207d160f22396">Commit</a>)</p></li>
</ul>
<h3 id="credits">9 Credits</h3><p>See the
<a href="http://contributors.rubyonrails.org/">full list of contributors to Rails</a> for
the many people who spent many hours making Rails, the stable and robust
framework it is. Kudos to all of them.</p>

        <h3>反馈</h3>
        <p>
          我们鼓励您帮助提高本指南的质量。
        </p>
        <p>
          如果看到如何错字或错误，请反馈给我们。
          您可以阅读我们的<a href="http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation">文档贡献</a>指南。
        </p>
        <p>
          您还可能会发现内容不完整或不是最新版本。
          请添加缺失文档到 master 分支。请先确认 <a href="http://edgeguides.rubyonrails.org">Edge Guides</a> 是否已经修复。
          关于用语约定，请查看<a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails 指南指导</a>。
        </p>
        <p>
          无论什么原因，如果你发现了问题但无法修补它，请<a href="https://github.com/rails/rails/issues">创建 issue</a>。
        </p>
        <p>
          最后，欢迎到 <a href="http://groups.google.com/group/rubyonrails-docs">rubyonrails-docs 邮件列表</a>参与任何有关 Ruby on Rails 文档的讨论。
        </p>
        <h4>中文翻译反馈</h4>
        <p>贡献：<a href="https://github.com/ruby-china/guides">https://github.com/ruby-china/guides</a>。</p>
      </div>
    </div>
  </div>

  <hr class="hide" />
  <div id="footer">
    <div class="wrapper">
      <p>本著作采用 <a href="https://creativecommons.org/licenses/by-sa/4.0/">创作共用 署名-相同方式共享 4.0 国际</a> 授权</p>
<p>“Rails”，“Ruby on Rails”，以及 Rails Logo 为 David Heinemeier Hansson 的商标。版权所有</p>

    </div>
  </div>

  <script type="text/javascript" src="javascripts/jquery.min.js"></script>
  <script type="text/javascript" src="javascripts/responsive-tables.js"></script>
  <script type="text/javascript" src="javascripts/guides.js"></script>
  <script type="text/javascript" src="javascripts/syntaxhighlighter.js"></script>
  <script type="text/javascript">
    syntaxhighlighterConfig = {
      autoLinks: false,
    };
    $(guidesIndex.bind);
  </script>
</body>
</html>
